package com.aiyige.page.my.customer.model;

/**
 * Created by xiachao on 2017/11/23.
 */

public class CheckboxSelectionEntity {

    private CheckboxSelectionEntity(Builder builder) {
        setName(builder.name);
        setSelected(builder.selected);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getName() {
        return name == null ? "" : name;
    }

    public void setName(String name) {
        this.name = name;
    }

    String name;

    public CheckboxSelectionEntity(String name, boolean selected) {
        this.name = name;
        this.selected = selected;
    }


    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    boolean selected;

    public static final class Builder {
        private String name;
        private boolean selected;

        private Builder() {
        }

        public Builder name(String name) {
            this.name = name;
            return this;
        }

        public Builder selected(boolean selected) {
            this.selected = selected;
            return this;
        }

        public CheckboxSelectionEntity build() {
            return new CheckboxSelectionEntity(this);
        }
    }
}
